<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>CruiseControl.NET : Boolean Parameter</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            CruiseControl.NET : Boolean Parameter
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on Jul 25, 2009 by <font color="#0050B2">csut017</font>.
				    </div>

				    <h3><a name="BooleanParameter-BooleanParameter"></a>Boolean Parameter</h3>

<p>This will prompt the user to enter a boolean value when a force build is requested.</p>

<p>This parameter can then be used by a dynamic value in a task.</p>

<h3><a name="BooleanParameter-Version"></a>Version</h3>

<p>This parameter is available from version 1.5.0.</p>

<h3><a name="BooleanParameter-Examples"></a>Examples</h3>

<p>Minimal example:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;booleanParameter&gt;</span>
  <span class="code-tag">&lt;name&gt;</span>Target<span class="code-tag">&lt;/name&gt;</span>
  <span class="code-tag">&lt;true&gt;</span>Yes<span class="code-tag">&lt;/true&gt;</span>
  <span class="code-tag">&lt;false&gt;</span>No<span class="code-tag">&lt;/false&gt;</span>
<span class="code-tag">&lt;/booleanParameter&gt;</span></pre>
</div></div>

<p>Full example:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;booleanParameter&gt;</span>
  <span class="code-tag">&lt;name&gt;</span>Target<span class="code-tag">&lt;/name&gt;</span>
  <span class="code-tag">&lt;true name=<span class="code-quote">"PROD"</span>&gt;</span>Yes<span class="code-tag">&lt;/true&gt;</span>
  <span class="code-tag">&lt;false name=<span class="code-quote">"DEV"</span>&gt;</span>No<span class="code-tag">&lt;/false&gt;</span>
  <span class="code-tag">&lt;display&gt;</span>Production Build<span class="code-tag">&lt;/display&gt;</span>
  <span class="code-tag">&lt;description&gt;</span>Do you want to generate a production build?<span class="code-tag">&lt;/description&gt;</span>
  <span class="code-tag">&lt;default&gt;</span>DEV<span class="code-tag">&lt;/default&gt;</span>
  <span class="code-tag">&lt;required&gt;</span>false<span class="code-tag">&lt;/required&gt;</span>
<span class="code-tag">&lt;/booleanParameter&gt;</span></pre>
</div></div>

<p>Example in context:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;project name=<span class="code-quote">"Test Project"</span>&gt;</span>
  <span class="code-tag">&lt;sourcecontrol type=<span class="code-quote">"svn"</span>&gt;</span>
    <span class="code-tag"><span class="code-comment">&lt;!-- Omitted for brevity --&gt;</span></span>
  <span class="code-tag">&lt;/sourcecontrol&gt;</span>
  <span class="code-tag">&lt;triggers&gt;</span>
    <span class="code-tag">&lt;intervalTrigger /&gt;</span>
  <span class="code-tag">&lt;/triggers&gt;</span>
  <span class="code-tag">&lt;tasks&gt;</span>
    <span class="code-tag"><span class="code-comment">&lt;!-- Omitted for brevity --&gt;</span></span>
  <span class="code-tag">&lt;/tasks&gt;</span>
  <span class="code-tag">&lt;publishers&gt;</span>
    <span class="code-tag"><span class="code-comment">&lt;!-- Omitted for brevity --&gt;</span></span>
  <span class="code-tag">&lt;/publishers&gt;</span>
  <span class="code-tag">&lt;parameters&gt;</span>
    <span class="code-tag">&lt;booleanParameter&gt;</span>
      <span class="code-tag">&lt;name&gt;</span>Target<span class="code-tag">&lt;/name&gt;</span>
      <span class="code-tag">&lt;true name=<span class="code-quote">"PROD"</span>&gt;</span>Yes<span class="code-tag">&lt;/true&gt;</span>
      <span class="code-tag">&lt;false name=<span class="code-quote">"DEV"</span>&gt;</span>No<span class="code-tag">&lt;/false&gt;</span>
      <span class="code-tag">&lt;display&gt;</span>Production Build<span class="code-tag">&lt;/display&gt;</span>
      <span class="code-tag">&lt;description&gt;</span>Do you want to generate a production build?<span class="code-tag">&lt;/description&gt;</span>
      <span class="code-tag">&lt;default&gt;</span>DEV<span class="code-tag">&lt;/default&gt;</span>
      <span class="code-tag">&lt;required&gt;</span>false<span class="code-tag">&lt;/required&gt;</span>
    <span class="code-tag">&lt;/booleanParameter&gt;</span>
  <span class="code-tag">&lt;/parameters&gt;</span>
<span class="code-tag">&lt;/project&gt;</span></pre>
</div></div>

<h3><a name="BooleanParameter-ConfigurationElements%3A"></a>Configuration Elements:</h3>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Node </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Required </th>
<th class='confluenceTh'> Default </th>
<th class='confluenceTh'> Version </th>
</tr>
<tr>
<td class='confluenceTd'> name </td>
<td class='confluenceTd'> The name of the parameter. This is the name that will be used internally by CruiseControl.NET. </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> Yes </td>
<td class='confluenceTd'> <em>n/a</em> </td>
<td class='confluenceTd'> 1.5.0 </td>
</tr>
<tr>
<td class='confluenceTd'> display </td>
<td class='confluenceTd'> The display label for the parameter. If set, this is what the user will see. If it is not set, then the name will be used for the label. </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> <em>none</em> </td>
<td class='confluenceTd'> 1.5.0 </td>
</tr>
<tr>
<td class='confluenceTd'> description </td>
<td class='confluenceTd'> A description to display to the user. </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> <em>none</em> </td>
<td class='confluenceTd'> 1.5.0 </td>
</tr>
<tr>
<td class='confluenceTd'> default </td>
<td class='confluenceTd'> The default value to use if the user does not enter a value for this parameter. </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> <em>None</em> </td>
<td class='confluenceTd'> 1.5.0 </td>
</tr>
<tr>
<td class='confluenceTd'> required </td>
<td class='confluenceTd'> Whether the parameter is required or not. </td>
<td class='confluenceTd'> Boolean </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> False </td>
<td class='confluenceTd'> 1.5.0 </td>
</tr>
<tr>
<td class='confluenceTd'> true </td>
<td class='confluenceTd'> The value to use when the parameter is true. If the name attribute is set, then the user will see that as the selection value. Otherwise the actual value will be displayed. </td>
<td class='confluenceTd'> NameValuePair </td>
<td class='confluenceTd'> Yes </td>
<td class='confluenceTd'> <em>n/a</em> </td>
<td class='confluenceTd'> 1.5.0 </td>
</tr>
<tr>
<td class='confluenceTd'> false </td>
<td class='confluenceTd'> The value to use when the parameter is false. If the name attribute is set, then the user will see that as the selection value. Otherwise the actual value will be displayed. </td>
<td class='confluenceTd'> NameValuePair </td>
<td class='confluenceTd'> Yes </td>
<td class='confluenceTd'> <em>n/a</em> </td>
<td class='confluenceTd'> 1.5.0 </td>
</tr>
</tbody></table>

				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="http://confluence.public.thoughtworks.org//images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Sep 29, 2009 20:59</font></td>
		    </tr>
	    </table>
    </body>
</html>